package com.listeningframework.boot.codegen.generators.coders;

import com.listeningframework.boot.codegen.constants.Templates;
import com.listeningframework.boot.codegen.context.MetaContext;
import com.listeningframework.boot.codegen.exception.BusinessException;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * @description Controller Coder 
 *
 * @author lixining
 * @version $Id: ControllerCoder.java, v 0.1 2016年12月5日 下午1:53:06 lixining Exp $
 */
public class ControllerCoder extends AbstractCoder {

    public ControllerCoder(MetaContext context) {
        super(context);
    }

    @Override
    protected String getContent() throws BusinessException {
        return render(Templates.CONTROLLER);
    }

    @Override
    protected Map<String, Object> getParams() {
        Map<String, Object> paramMap = new HashMap<>();

        return paramMap;
    }

    @Override
    protected String getSavePath() throws BusinessException {
        return context.getControllerPath();
    }

}
